<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- 这个是满足条件的渲染 -->
        <div v-if="age<18"> 未成年</div>
        <!-- 这个是渲染   即使不满足也渲染只是不展示   添加属性display none-->
        <div v-show="age>=18"> 成年</div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                age: 12
            }
        })
    </script>
</body>

</html>